﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _2323._5._5无聊
{
    public  class  Rectangle : Shape
    {
        double _length;
        double _height;

        public Rectangle(double length,double height)
        {
            Length = length;
            Height = height;
        }

        public double Length { get => _length; set => _length = value; }
        public double Height { get => _height; set => _height = value; }

        public override double Area()
        {
            return Length * Height;
        }

        public override double Perimeter()
        {
            return 2 * (Length + Height); 
        }

        public override void print()
        {
            Console.WriteLine("矩形面积为{0}，周长为{1}", Area(), Perimeter());
        }
    }
}
